import request from '../utils/request/request';
import { createTheURL } from '../utils/utils';
import { api } from '../utils/config';

export async function fakeAccountLogin(params) {
  return request(createTheURL(api.testAPI, 'LOGIN'), {
    method: 'POST',
    body: params,
  });
}

export async function fakeAccountLogout() {
  return request(createTheURL(api.testAPI,'LOGOUT'), {
    method: 'POST',
  });
}

export async function fakeRegister(params) {
  return request(createTheURL(api.testAPI, 'REGISTER'), {
    method: 'POST',
    body: params,
  });
}

export async function fakeMenuList(params) {
  return request(createTheURL(api.testAPI,'PERMISSIONS'), {
    method: 'POST',
    body: params,
  });
}

export async function queryNotices() {
  return request(createTheURL(api.testAPI,'NOTICES'));
}
